package com.bzkj.basicinfo.service.exception;

import com.bzkj.basicinfo.domain.exception.WmsExceptionRecordEntity;
import com.bzkj.common.core.domain.AjaxResult;
import com.bzkj.common.core.page.TableDataInfo;
import java.util.List;

/**
 * WMS异常记录服务接口
 *
 * @author WMS
 * @date 2025-10-23
 */
public interface WmsExceptionRecordService {

    /**
     * 查询异常记录列表（分页）
     */
    TableDataInfo getExceptionRecordList(WmsExceptionRecordEntity entity, int pageNum, int pageSize);

    /**
     * 根据ID查询异常记录详情
     */
    AjaxResult getExceptionRecordDetail(Long id);

    /**
     * 创建异常记录
     */
    AjaxResult createExceptionRecord(String exceptionType, String relatedOrderType,
                                   String relatedOrderNo, Long relatedOrderId,
                                   String exceptionTitle, String exceptionDesc,
                                   String exceptionReason, String operator);

    /**
     * 处理异常记录
     */
    AjaxResult handleException(Long id, String handlePlan, String handleResult, String handler);

    /**
     * 关闭异常记录
     */
    AjaxResult closeException(Long id, String closeReason, String operator);

    /**
     * 根据关联单据查询异常记录
     */
    List<WmsExceptionRecordEntity> getExceptionsByRelatedOrder(String relatedOrderType, String relatedOrderNo);
}